Optimal. Leaf size=120 \[ \frac {2 \sqrt {e \cos (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{3 a^2 d \sqrt {\cos (c+d x)}}+\frac {2 i \sqrt {e \cos (c+d x)}}{9 d (a+i a \tan (c+d x))^2}+\frac {2 i \sqrt {e \cos (c+d x)}}{9 d \left (a^2+i a^2 \tan (c+d x)\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.11, antiderivative size = 126, normalized size of antiderivative = 1.05, number of steps
used = 5, number of rules used = 5, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.179, Rules used = {3596, 3581,
3854, 3856, 2719} \begin {gather*} \frac {4 i \cos ^2(c+d x) \sqrt {e \cos (c+d x)}}{9 d \left (a^2+i a^2 \tan (c+d x)\right )}+\frac {2 \sin (c+d x) \cos (c+d x) \sqrt {e \cos (c+d x)}}{9 a^2 d}+\frac {2 E\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {e \cos (c+d x)}}{3 a^2 d \sqrt {\cos (c+d x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2719
Rule 3581
Rule 3596
Rule 3854
Rule 3856
Rubi steps
\begin {align*} \int \frac {\sqrt {e \cos (c+d x)}}{(a+i a \tan (c+d x))^2} \, dx &=\left (\sqrt {e \cos (c+d x)} \sqrt {e \sec (c+d x)}\right ) \int \frac {1}{\sqrt {e \sec (c+d x)} (a+i a \tan (c+d x))^2} \, dx\\ &=\frac {4 i \cos ^2(c+d x) \sqrt {e \cos (c+d x)}}{9 d \left (a^2+i a^2 \tan (c+d x)\right )}+\frac {\left (5 e^2 \sqrt {e \cos (c+d x)} \sqrt {e \sec (c+d x)}\right ) \int \frac {1}{(e \sec (c+d x))^{5/2}} \, dx}{9 a^2}\\ &=\frac {2 \cos (c+d x) \sqrt {e \cos (c+d x)} \sin (c+d x)}{9 a^2 d}+\frac {4 i \cos ^2(c+d x) \sqrt {e \cos (c+d x)}}{9 d \left (a^2+i a^2 \tan (c+d x)\right )}+\frac {\left (\sqrt {e \cos (c+d x)} \sqrt {e \sec (c+d x)}\right ) \int \frac {1}{\sqrt {e \sec (c+d x)}} \, dx}{3 a^2}\\ &=\frac {2 \cos (c+d x) \sqrt {e \cos (c+d x)} \sin (c+d x)}{9 a^2 d}+\frac {4 i \cos ^2(c+d x) \sqrt {e \cos (c+d x)}}{9 d \left (a^2+i a^2 \tan (c+d x)\right )}+\frac {\sqrt {e \cos (c+d x)} \int \sqrt {\cos (c+d x)} \, dx}{3 a^2 \sqrt {\cos (c+d x)}}\\ &=\frac {2 \sqrt {e \cos (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{3 a^2 d \sqrt {\cos (c+d x)}}+\frac {2 \cos (c+d x) \sqrt {e \cos (c+d x)} \sin (c+d x)}{9 a^2 d}+\frac {4 i \cos ^2(c+d x) \sqrt {e \cos (c+d x)}}{9 d \left (a^2+i a^2 \tan (c+d x)\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains higher order function than in optimal. Order 5 vs. order 4 in
optimal.
time = 1.88, size = 420, normalized size = 3.50 \begin {gather*} \frac {\sqrt {e \cos (c+d x)} (\cos (d x)+i \sin (d x))^2 \left (\frac {2 \sqrt {2} e^{-i d x} \csc (c) \left (3+3 e^{2 i (c+d x)}+3 \sqrt {1-i e^{i (c+d x)}} \sqrt {e^{i (c+d x)} \left (-i+e^{i (c+d x)}\right )} E\left (\left .\text {ArcSin}\left (\sqrt {-i \cos (c+d x)+\sin (c+d x)}\right )\right |-1\right )-3 \sqrt {1-i e^{i (c+d x)}} \sqrt {e^{i (c+d x)} \left (-i+e^{i (c+d x)}\right )} F\left (\left .\text {ArcSin}\left (\sqrt {-i \cos (c+d x)+\sin (c+d x)}\right )\right |-1\right )+e^{2 i d x} \sqrt {1+e^{2 i (c+d x)}} \, _2F_1\left (\frac {1}{2},\frac {3}{4};\frac {7}{4};-e^{2 i (c+d x)}\right )\right ) (\cos (2 c)+i \sin (2 c))}{9 \sqrt {e^{-i (c+d x)} \left (1+e^{2 i (c+d x)}\right )}}-\frac {1}{9} \sqrt {\cos (c+d x)} \csc (c) (\cos (2 d x)-i \sin (2 d x)) (7 \cos (c+2 d x)+5 \cos (3 c+2 d x)-4 i (\sin (c)-2 \sin (c+2 d x)-\sin (3 c+2 d x)))\right )}{2 d \cos ^{\frac {5}{2}}(c+d x) (a+i a \tan (c+d x))^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 276 vs. \(2 (128 ) = 256\).
time = 1.41, size = 277, normalized size = 2.31
method | result | size |
default | \(\frac {2 e \left (-64 i \left (\sin ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+64 \left (\sin ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+160 i \left (\sin ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-128 \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (\sin ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-160 i \left (\sin ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+104 \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (\sin ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+80 i \left (\sin ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-40 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \cos \left (\frac {d x}{2}+\frac {c}{2}\right )-20 i \left (\sin ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+6 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+3 \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, \EllipticE \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )+2 i \sin \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{9 a^{2} \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {-2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) e +e}\, d}\) | \(277\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: RuntimeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 0.09, size = 103, normalized size = 0.86 \begin {gather*} \frac {{\left (\sqrt {\frac {1}{2}} {\left (i \, e^{\frac {1}{2}} + 15 i \, e^{\left (4 i \, d x + 4 i \, c + \frac {1}{2}\right )} + 4 i \, e^{\left (2 i \, d x + 2 i \, c + \frac {1}{2}\right )}\right )} \sqrt {e^{\left (2 i \, d x + 2 i \, c\right )} + 1} e^{\left (-\frac {1}{2} i \, d x - \frac {1}{2} i \, c\right )} + 12 i \, \sqrt {2} e^{\left (4 i \, d x + 4 i \, c + \frac {1}{2}\right )} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, e^{\left (i \, d x + i \, c\right )}\right )\right )\right )} e^{\left (-4 i \, d x - 4 i \, c\right )}}{18 \, a^{2} d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} - \frac {\int \frac {\sqrt {e \cos {\left (c + d x \right )}}}{\tan ^{2}{\left (c + d x \right )} - 2 i \tan {\left (c + d x \right )} - 1}\, dx}{a^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {\sqrt {e\,\cos \left (c+d\,x\right )}}{{\left (a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}^2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________